package com.example.demo.singletonpattern;

import java.util.ArrayList;
import java.util.List;
import java.util.Optional;

/**
 * @author :xie
 * Email: 1487471733@qq.com
 * Date: 2018/9/7
 * Time: 11:07
 * Describe:
 */
public class Demo {

    public static void main(String[] args) {
        SingleObject object = SingleObject.getInstance();

        object.setCanShu("1212121");
        object.showMessage();





        SingleObject object12 = SingleObject.getInstance();

        object12.showMessage();

        List<String> list=new ArrayList<>(10);

        Optional<List<String>> da=Optional.ofNullable(list);

    }
}
